1. Field of the Invention
This invention relates to computer software, and more particularly to proxying isomorphic interfaces in different subsystems.
2. Description of the Related Art
In strongly typed languages such as Java, subsystems typically require explicit knowledge of each other in order to interact. This makes it difficult if not impossible for two mutually indifferent subsystems to be combined at runtime without having a common shared library to bridge the gap. For example, given the following interfaces:
Interface orange.Foo {                void abc( );        
}
interface purple.Foo {                void abc( );        
}
void client (purple.Foo foo) {                void abc( );        
}
the following call is illegal:
client (new orange.Foo( ));
If a client is programmed against the purple interface, it cannot directly invoke an object that implements the orange interface even if those two interfaces are isomorphic because Java is a strongly typed language.
To make this legal, so that, in this example, the purples can invoke oranges and vice versa, the commonality needs to be factored out and the two subsystems need to be written against it. However, when those subsystems are evolving rapidly, having a common library introduces challenges that include preserving backward compatibility between versions of the subsystems, since any change in the shared library may affect systems currently deployed. Maintaining such a shared library can quickly become tedious and error-prone.
The Java Reflection API Specification, developed by Sun Microsystems, Inc., enables Java applications to discover information about the fields, methods, and constructors of loaded classes, and to use reflected fields, methods and constructors to operate on their underlying counterparts on objects, within security restrictions. This discovery happens at runtime without any prior knowledge at compilation time. However, Reflection is not transparent to programmers—it requires a non-trivial amount of tedious and potentially fragile code in order to perform simple method calls.